<?php

//Load::lib('general');

class otros {

    public function codigoPais() {
        $url = "http://api.ipinfodb.com/v2/ip_query.php?key=17c077a658774e3b40a4bdf121994c5d3e91a3a7d27782ac80d6417f2f62ed64&ip=" . General::getIP() . "&timezone=false";
        //$url = "http://api.ipinfodb.com/v2/ip_query.php?key=17c077a658774e3b40a4bdf121994c5d3e91a3a7d27782ac80d6417f2f62ed64&ip=208.113.135.6&timezone=false";
        $xml = file_get_contents($url);
        $obj = simplexml_load_string($xml);
        return strtolower($obj->CountryCode);
    }

}

?>
